<?php

namespace App\Observers;

use App\Models\Brand;

class BrandObserver
{
	public function deleting(Brand $brand)
	{
		if (has_child($brand, 'products')) {
			abort(403, '检测到关联品牌商品');
		}
	}
}
